home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Found / FWStream / Sources / FWStrmRW.cpp < prev    next >
Encoding:
Text File  |  1996-08-16  |  3.6 KB  |  110 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWStrmRW.cpp
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #include "FWFound.hpp"
  11.  
  12. #ifndef FWSTRMRW_H
  13. #include "FWStrmRW.h"
  14. #endif
  15.  
  16. #ifndef FWPRIDEB_H
  17. #include "FWPriDeb.h"
  18. #endif
  19.  
  20. #ifndef FWEXCLIB_H
  21. #include "FWExcLib.h"
  22. #endif
  23.  
  24. #include "SLASinks.xh"
  25. #include "SLObjReg.xh"
  26.  
  27. //========================================================================================
  28. //    RunTime Info
  29. //========================================================================================
  30.  
  31. #ifdef FW_BUILD_MAC
  32. #pragma segment FWStream
  33. #endif
  34.  
  35. FW_DEFINE_AUTO(FW_CReadableStream)
  36. FW_DEFINE_AUTO(FW_CWritableStream)
  37.  
  38. //========================================================================================
  39. //    CLASS FW_CReadableStream
  40. //========================================================================================
  41.  
  42. //----------------------------------------------------------------------------------------
  43. // FW_CReadableStream::FW_CReadableStream
  44. //----------------------------------------------------------------------------------------
  45.  
  46. FW_CReadableStream::FW_CReadableStream(FW_OSink* sink,
  47.                                        FW_OObjectRegistry* objectRegistry,
  48.                                        int numberFormat)
  49. {
  50.     ::FW_FailOnError(FW_PrivReadableStream_Construct(this, sink, objectRegistry, numberFormat));
  51.     FW_END_CONSTRUCTOR
  52. }
  53.  
  54. //----------------------------------------------------------------------------------------
  55. // FW_CReadableStream::FW_CReadableStream
  56. //----------------------------------------------------------------------------------------
  57.  
  58. FW_CReadableStream::FW_CReadableStream(FW_HReadableStream hStream)
  59. {
  60.     ::FW_FailOnError(FW_PrivReadableStream_CopyConstruct(this, hStream));
  61.     FW_END_CONSTRUCTOR
  62. }
  63.  
  64. //----------------------------------------------------------------------------------------
  65. // FW_CReadableStream::~FW_CReadableStream
  66. //----------------------------------------------------------------------------------------
  67.  
  68. FW_CReadableStream::~FW_CReadableStream()
  69. {
  70.     FW_START_DESTRUCTOR
  71.     ::FW_FailOnError(FW_PrivReadableStream_Destruct(this));
  72. }
  73.  
  74.  
  75. //========================================================================================
  76. //    CLASS FW_CWritableStream
  77. //========================================================================================
  78.  
  79. //----------------------------------------------------------------------------------------
  80. // FW_CWritableStream::FW_CWritableStream
  81. //----------------------------------------------------------------------------------------
  82.  
  83. FW_CWritableStream::FW_CWritableStream(FW_OSink* sink,
  84.                                        FW_OObjectRegistry* objectRegistry,
  85.                                        int numberFormat)
  86. {
  87.     ::FW_FailOnError(FW_PrivWritableStream_Construct(this, sink, objectRegistry, numberFormat));
  88.     FW_END_CONSTRUCTOR
  89. }
  90.  
  91. //----------------------------------------------------------------------------------------
  92. // FW_CWritableStream::FW_CWritableStream
  93. //----------------------------------------------------------------------------------------
  94.  
  95. FW_CWritableStream::FW_CWritableStream(FW_HWritableStream hStream)
  96. {
  97.     ::FW_FailOnError(FW_PrivWritableStream_CopyConstruct(this, hStream));
  98.     FW_END_CONSTRUCTOR
  99. }
  100.  
  101. //----------------------------------------------------------------------------------------
  102. // FW_CWritableStream::~FW_CWritableStream
  103. //----------------------------------------------------------------------------------------
  104.  
  105. FW_CWritableStream::~FW_CWritableStream()
  106. {
  107.     FW_START_DESTRUCTOR
  108.     ::FW_FailOnError(FW_PrivWritableStream_Destruct(this));
  109. }
  110.